<? $this->load->view('header'); ?>
  <header  id="site-header">
    
  <header  id="site-header">

    
  <section  id="search-bar">
    <div  class="wrapper">
    <form  action="http://m.ichufang.cn/search/caipu/"  method="GET">
        <input  type="text"  class="search"  placeholder="菜谱、食材搜索"  name="keyword">
        <input  type="submit"  hidden="True"  value="搜索"  class="search-button">
    </form>
    </div>
  </section>

  </header>

  </header>

  
  

  <div  class="recipe-full">

    <div  class="recipe-cover"  style="background-image:url(<?=$caipu_info['coverImage']?>)">
    </div>

    <div  class="wrapper">
      <header>
        <div  class="name">
          <h1  class="plain"><?=$caipu_info['title']?></h1>
          <span  class="cooked"><?=$caipu_info['deal']?> 人份</span>
        </div>
        <aside  class="score">
          <p  class="plain"><?=$caipu_info['costtime']?></p>
          烹饪时间
        </aside>
      </header>

      <section>
        <?php if($caipu_info['infos']):?>
        <p class="recipe-desc"><?=$caipu_info['infos']?></p>
        <?php endif;?>
      </section>

      <section  class="ing">
          <h2>
            食材
          </h2>
          <ul class="plain">
              <?php $index = 0;?>
              <?php foreach( $caipu_info['materials'] as $materials_list) :?>
              <?php $index++;?>
                <?php $materials = explode('，',$materials_list);?>
                <?php $scname = my_string_filter(@$materials[0]);?>
                    <li>
                      <span  class="ingredient"><a class="red-font" target="_blank" title="<?=$scname?>的做法大全" href="<?=site_url('search/caipu/'.$scname)?>"><?=$scname?></a></span>
                      <span  class="weight"><?=@$materials[1]?></span>
                    </li>
              <?php endforeach?>
          </ul>
      </section>

      <section  class="step">
        

        <h2>
          做法 &nbsp;
        </h2>
        <ul  class="plain">
          <?php $index = 0;?>
          <?php foreach( $caipu_info['setpInfos'] as $setpInfos) :?>
          <?php if($setpInfos != ''):?>
          <li>
            <aside  class="plain"><?=$index+1?></aside>
            <div>
            <?php if (@$caipu_info['setpimage'][$index]['location']):?><img alt="" src="<?=@$caipu_info['setpimage'][$index]['location']?>"><?php endif?>
              <p><?=$setpInfos?></p>
            </div>
            <?php $index++;?>
          </li>
          <?php endif?>
          <?php endforeach?>
        </ul>

        <div  class="tips">
          <?php if($caipu_info['tips']):?>
          <span><?=$caipu_info['title']?>的技巧</span>
          <p><?=$caipu_info['tips']?></p>
          <?php endif;?>
        </div>
      </section>


<div id="SOHUCS"></div>
<script>
(function(){
    var expire_time = parseInt((new Date()).getTime()/(5*60*1000));
    var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
    var script_version = document.createElement("script"),script_cyan = document.createElement("script");
    script_version.type = script_cyan.type = "text/javascript";
    script_version.charset = script_cyan.charset = "utf-8";
    script_version.onload = function(){
        script_cyan.id = 'changyan_mobile_js';
        script_cyan.src = 'http://changyan.itc.cn/upload/mobile/wap-js/changyan_mobile.js?client_id=cyrGlnl2w&'
                        + 'conf=prod_c3e21e0ce90bcdc5faed7a4421cc8dd6&version=' + cyan_resource_version;
        head.insertBefore(script_cyan, head.firstChild);
    };
    script_version.src = 'http://changyan.sohu.com/upload/mobile/wap-js/version.js?_='+expire_time;
    head.insertBefore(script_version, head.firstChild);
})();
</script>


            
      <section  class="recipe-dishes">
        
        <header>
          <h3>看过<?=$caipu_info['title']?>的人还喜欢看</h3>
          <div> <a href="http://m.ichufang.cn/caipu/">查看更多 &gt;</a></div>
        </header>
        <div  class="dishes swipe"  id="slider"  style="visibility: visible;">
          <div  class="swipe-wrap"  style="width: 7338px;">
          <?php $xgcpi=0;?>
          <?php foreach($caipu_info['caipu_related_list'] as $related):?>
            <?php if ($caipu_info['id'] != $related['id']) :?>
                  <div  class="dish-148-horizontal"  data-index="<?=$xgcpi;?>"  style="width: 1223px; left: 0px; transition: 400ms; -webkit-transition: 400ms; -webkit-transform: translate(-1223px, 0px) translateZ(0px);">
                    <div  class="body">
                      <aside  class="cover"  style="background-image: url(<?=$related['coverImage']?>);">
                        <a  href="http://m.ichufang.cn/recipe/<?=$related['id']?>"  class="expand"></a>
                      </aside>
                      <div  class="content">
                        <div>
                          <span  class="author"><a  href="###"><?=$related['author']?></a></span>
                          <span  class="time"></span>
                        </div>
                        <p  class="desc">
                          制作需要 <?=$related['costtime']?>分左右
                        </p>
                      </div>
                    </div>
                  </div>
            <?php $xgcpi++;?>
            <?php endif; ?>
          <?php endforeach; ?>
          </div>
        </div>

        <ul  class="slider-nav plain">
              <li  class=""></li>
              <li  class=""></li>
              <li  class=""></li>
              <li  class=""></li>
              <li  class=""></li>
              <li  class="on"></li>
        </ul>
      </section>
    </div>

    <section  class="recipe-search">
      <a  href="http://m.ichufang.cn/search/caipu/<?=$caipu_info['title']?>"><?=$caipu_info['title']?>的全部菜谱</a>
    </section>

    <div  class="wrapper">
      <section  class="recipe-menus">
        <h3>厨房知识</h3>
        <ul  class="plain">
          <?php foreach ($article_list as $article) :?>
          <li><a href="http://m.ichufang.cn/article/views/<?=$article['id']?>" title="<?=$article['title']?>"><?=$article['title']?></a></li>
          <?php endforeach;?>
        </ul>
      </section>

    </div>

    <section  class="recipe-author">
      <div  class="user-namecard">
        <div  class="title"><h3  class="plain">作者</h3></div>
          <a  href="###"  class="expand">
            <img  src="<?=$caipu_info['user_avartar']?>"  alt="<?=$caipu_info['author']?>">
            <h3  class="name"><?=$caipu_info['author']?></h3>
          </a>
          <p  class="desc">
            
          </p>
      </div>
    </section>

    <div  class="create_time plain">该菜谱创建于 <?=date('Y-m-d', $caipu_info['time'])?></div>    

  </div>

  <? $this->load->view('footer'); ?>